﻿<UserControl x:Class="Albatross.SampleClient.Views.ContactView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
			 xmlns:commonViews="clr-namespace:Albatross.WPF.Common.Views;assembly=Albatross.WPF.Common"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
	<UserControl.Resources>
		<ResourceDictionary Source="Common.xaml"/>
	</UserControl.Resources>
	<DockPanel>
		<TextBlock Text="{Binding Title}" Style="{StaticResource header}" DockPanel.Dock="Top"/>
		<ToolBar DockPanel.Dock="Top" Style="{Binding toolbar}">
			<Button Command="{Binding RefreshCommand}" CommandParameter="{Binding (commonViews:Attached.ViewService), RelativeSource={RelativeSource Self}}">Refresh</Button>
			<Button Command="{Binding SaveCommand}" CommandParameter="{Binding (commonViews:Attached.ViewService), RelativeSource={RelativeSource Self}}">Save</Button>
			<Separator/>
			<Button Command="{Binding DeleteCommand}" CommandParameter="{Binding (commonViews:Attached.ViewService), RelativeSource={RelativeSource Self}}">Delete</Button>
		</ToolBar>

		<DockPanel DockPanel.Dock="Top">
			<TextBlock Style="{StaticResource label}">ID</TextBlock>
			<TextBox Style="{StaticResource content}" Text="{Binding Contact.ID}" IsReadOnly="True"/>
		</DockPanel>
		
		<DockPanel DockPanel.Dock="Top">
			<TextBlock Style="{StaticResource label}">First Name</TextBlock>
			<TextBox Style="{StaticResource content}" Text="{Binding Contact.FirstName}"/>
		</DockPanel>

		<DockPanel DockPanel.Dock="Top">
			<TextBlock Style="{StaticResource label}">Last Name</TextBlock>
			<TextBox Style="{StaticResource content}" Text="{Binding Contact.LastName}"/>
		</DockPanel>

		<DockPanel DockPanel.Dock="Top">
			<TextBlock Style="{StaticResource label}">Cell Phone</TextBlock>
			<TextBox Style="{StaticResource content}" Text="{Binding Contact.CellPhone}"/>
		</DockPanel>
	</DockPanel>
</UserControl>
